<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/static/common/taglibs.jsp"%>
<div class="page">
	<div class="pageHeader">
		<form id="pagerForm" onsubmit="return navTabSearch(this);"
			action="${ctx}/order" method="post">
			<!--Begin page Search -->
			<input type="hidden" id="numPerPage" name="page.pageSize"
				value="${page.pageSize}" /> <input type="hidden" name="page.pageNo"
				id="pageNum" value="${page.pageNo}" /> <input type="hidden"
				name="page.orderBy" id="orderField" value="${page.orderBy}" /> <input
				type="hidden" name="page.order" id="order" value="${page.order}" />
				</form>
	</div>

	<div class="pageContent">
		<div class="panelBar">
			<ul class="toolBar">
				<li class="line">line</li>
				<li><a class="delete" href="${ctx}/order/deletes"
					target="selectedTodo" title="确实要删除这些记录吗?"><span>删除</span> </a></li>
			</ul>
		</div>
		<div class="panelBar">
			<div class="pages">
				<span>每页显示</span> <select name="numPerPage"
					onchange="navTabPageBreak({numPerPage:this.value})">
					<c:forEach items="${selectPageList}" var="model">
						<option value="${model.key}"
							<c:if test="${model.key==page.pageSize}">selected="selected"</c:if>>${model.value}</option>
					</c:forEach>
				</select> <span>&nbsp;共${page.totalCount}条,共${page.totalPages}页</span>
			</div>
			<div class="pagination" targetType="navTab"
				totalCount="${page.totalCount}" numPerPage="${page.pageSize}"
				pageNumShown="10" currentPage="${page.pageNo}"></div>
		</div>
		<table class="table myTable" width="100%" layouth="148">
			<thead>
				<tr>
				<th width="3%"><input type="checkbox" class="checkboxCtrl"
						group="ids"></th>
					<th align="center">订单号</th>
					<th align="center">所属用户</th>
					<th align="center">所属上级</th>
					<th align="center">提交时间</th>
					<th align="center">操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${page.result}" var="order" varStatus="index">
					<tr target="sid_id" rel="${order.id}">
					    <td><input type="checkbox" value="${order.id}" name="ids"></td>
					    <td>${order.orderNum }</td>
					    <td>${order.user.loginName }</td>
					     <td>${order.user.parent.loginName }</td>
					    <td>${order.submitTime }</td>
						<td align="center">
						
						
						<table>
						<tr>
						<c:if test="${order.status==0 }">
						<td style="border-color: gray;">
						<a 
									href="${ctx}/order/deal/${order.id}" width="800"
									height="500" target="ajaxTodo"  title="确认将该订单标记为已处理？">确认处理</a>&nbsp;&nbsp;&nbsp;
						</td>
						</c:if>
						<c:if test="${order.status==1 }">
						<td style="border-color: gray"><a style="color: red">已处理</a></td>
						</c:if>
						<td style="border-color: gray"><a  href="${ctx}/order/delete/${order.id}"
									target="ajaxTodo" title="确定要删除吗？">删除</a></td>
						<td style="border-color: gray"><a 
									href="${ctx}/order/detail/${order.id}/1" width="800"
									height="500" target="navTab" title="查看详情">查看钻石详情</a></td>
						<td style="border-color: gray" ><a 
									href="${ctx}/order/detail/${order.id}/2" width="800"
									height="500" target="navTab" title="查看详情">查看戒托详情</a></td>
						<td style="border-color: gray" ><a 
									href="${ctx}/order/downloadOrder/${order.id}" width="800"
									height="500" title="导出订单">导出订单</a></td>
						</tr>
						</table>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</div>
